diff -Nuar libindi-0.7.2.orig//CMakeLists.txt libindi-0.7.2/CMakeLists.txt
--- libindi-0.7.2.orig//CMakeLists.txt	2010-11-20 13:38:03.000000000 +0200
+++ libindi-0.7.2/CMakeLists.txt	2010-11-25 14:01:46.938033274 +0200
@@ -148,24 +148,32 @@
 set_target_properties(indi PROPERTIES VERSION ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
 
 
-##################################################
-######## INDI Base Driver Static Library #########
-##################################################
-add_library(indibasedriver STATIC ${indimain_SRCS})
-install(TARGETS indibasedriver ARCHIVE DESTINATION lib${LIB_POSTFIX})
-
-##################################################
-###### INDI Default Driver Static Library ########
-##################################################
-add_library(indidefaultdriver STATIC ${indimain_SRCS} ${indidefaultdevice_SRCS})
-install(TARGETS indidefaultdriver ARCHIVE DESTINATION lib${LIB_POSTFIX})
+###########################################
+######## INDI Base Driver Library #########
+###########################################
+add_library(indibasedriver SHARED ${indimain_SRCS})
+target_link_libraries(indibasedriver indi m)
+install(TARGETS indibasedriver LIBRARY DESTINATION lib${LIB_POSTFIX})
+set_target_properties(indibasedriver PROPERTIES VERSION
+    ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
+
+###########################################
+###### INDI Default Driver Library ########
+###########################################
+add_library(indidefaultdriver SHARED ${indidefaultdevice_SRCS})
+target_link_libraries(indidefaultdriver indibasedriver m)
+install(TARGETS indidefaultdriver LIBRARY DESTINATION lib${LIB_POSTFIX})
+set_target_properties(indidefaultdriver PROPERTIES VERSION
+    ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
 
 ##################################################
 ############# INDI Client Library ################
 ##################################################
-add_library(indiclient STATIC ${indibase_SRCS})
-target_link_libraries(indiclient indi)
-install(TARGETS indiclient ARCHIVE DESTINATION lib${LIB_POSTFIX})
+add_library(indiclient SHARED ${indibase_SRCS})
+target_link_libraries(indiclient indi pthread)
+install(TARGETS indiclient LIBRARY DESTINATION lib${LIB_POSTFIX})
+set_target_properties(indiclient PROPERTIES VERSION
+    ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
 
 #####################################
 ########## TELESCOPE GROUP ##########
@@ -173,14 +181,13 @@
 
 ########### LX200 Basic #############
 set(lx200basic_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200basic.cpp )
 
 add_executable(indi_lx200basic ${lx200basic_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
 if (NOVA_FOUND)
-  target_link_libraries(indi_lx200basic ${NOVA_LIBRARIES})
+  target_link_libraries(indi_lx200basic indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)
 
 install(TARGETS indi_lx200basic RUNTIME DESTINATION bin )
@@ -189,7 +196,6 @@
 
 ########### LX200 Generic ###########
 set(lx200generic_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200autostar.cpp
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200_16.cpp
@@ -201,7 +207,7 @@
 
 add_executable(indi_lx200generic ${lx200generic_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_lx200generic  m )
+target_link_libraries(indi_lx200generic indibasedriver m )
 
 if (NOVA_FOUND)
   target_link_libraries(indi_lx200generic ${NOVA_LIBRARIES})
@@ -221,13 +227,12 @@
 
 ########### Celestron GPS ############
 set(celestrongps_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/celestronprotocol.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/celestrongps.cpp )
 
 add_executable(indi_celestron_gps ${celestrongps_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_celestron_gps m )
+target_link_libraries(indi_celestron_gps indibasedriver m )
 
 
 if (NOVA_FOUND)
@@ -240,7 +245,6 @@
 
 ########### Orion Atlas #############
 set(orionatlas_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/orionatlas.cpp )
 
 add_executable(indi_orion_atlas ${orionatlas_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
@@ -248,7 +252,7 @@
 #target_link_libraries(indi_orion_atlas ${KDE4_KDECORE_LIBS})
 
 if (NOVA_FOUND)
-  target_link_libraries(indi_orion_atlas ${NOVA_LIBRARIES})
+  target_link_libraries(indi_orion_atlas indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)
 
 install(TARGETS indi_orion_atlas RUNTIME DESTINATION bin )
@@ -259,12 +263,11 @@
 if (NOVA_FOUND)
 
 set(temma_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/temmadriver.c )
 
 add_executable(indi_temma ${temma_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_temma  ${NOVA_LIBRARIES} m )
+target_link_libraries(indi_temma indibasedriver  ${NOVA_LIBRARIES} m )
 
 install(TARGETS indi_temma RUNTIME DESTINATION bin )
 
@@ -273,16 +276,15 @@
 
 ########### Sky Commander #############
 set(skycommander_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/skycommander.c )
 
 add_executable(indi_skycommander ${skycommander_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_skycommander  m )
+target_link_libraries(indi_skycommander indibasedriver m )
 
 if (NOVA_FOUND)
-  target_link_libraries(indi_skycommander ${NOVA_LIBRARIES})
+  target_link_libraries(indi_skycommander indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)
 
 install(TARGETS indi_skycommander  RUNTIME DESTINATION bin )
@@ -291,13 +293,12 @@
 
 ########### Intelliscope ###############
 set(intelliscope_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
    ${CMAKE_SOURCE_DIR}/drivers/telescope/intelliscope.c )
 
 add_executable(indi_intelliscope ${intelliscope_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_intelliscope  m )
+target_link_libraries(indi_intelliscope indibasedriver m )
 
 if (NOVA_FOUND)
   target_link_libraries(indi_intelliscope ${NOVA_LIBRARIES})
@@ -312,13 +313,12 @@
 ###### FLI Precision Digital Focuser ######
 if (FLI_FOUND)
 set(flipdf_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/focuser/fli_pdf.c
 )
 
 add_executable(indi_fli_pdf ${flipdf_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_fli_pdf m ${FLI_LIBRARIES})
+target_link_libraries(indi_fli_pdf m indibasedriver ${FLI_LIBRARIES})
 
 if (NOVA_FOUND)
   target_link_libraries(indi_fli_pdf ${NOVA_LIBRARIES})
@@ -331,17 +331,16 @@
 ################ Robo Focuser ################
 
 set(robofocus_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/focuser/robofocus.c
 	${CMAKE_SOURCE_DIR}/drivers/focuser/robofocusdriver.c
    )
 
 add_executable(indi_robofocus ${robofocus_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_robofocus m)
+target_link_libraries(indi_robofocus indibasedriver m)
 
 if (NOVA_FOUND)
-  target_link_libraries(indi_robofocus ${NOVA_LIBRARIES})
+  target_link_libraries(indi_robofocus indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)
 
 install(TARGETS indi_robofocus RUNTIME DESTINATION bin )
@@ -354,16 +353,15 @@
 
 ########## True Technology Wheel ############
 set(trutechwheel_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/filter_wheel/trutech_wheel.c
    )
 
 add_executable(indi_trutech_wheel ${trutechwheel_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_trutech_wheel  m)
+target_link_libraries(indi_trutech_wheel indibasedriver  m)
 
 if (NOVA_FOUND)
-  target_link_libraries(indi_trutech_wheel ${NOVA_LIBRARIES})
+  target_link_libraries(indi_trutech_wheel indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)
 
 install(TARGETS indi_trutech_wheel RUNTIME DESTINATION bin )
@@ -373,16 +371,15 @@
 ########## FLI Filter Wheel ############
 if (FLI_FOUND)
 set(fliwheel_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/filter_wheel/fli_wheel.c
    )
 
 add_executable(indi_fli_wheel ${fliwheel_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_fli_wheel ${FLI_LIBRARIES} m)
+target_link_libraries(indi_fli_wheel indibasedriver ${FLI_LIBRARIES} m)
 
 if (NOVA_FOUND)
-  target_link_libraries(indi_fli_wheel ${NOVA_LIBRARIES})
+  target_link_libraries(indi_fli_wheel indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)
 
 install(TARGETS indi_fli_wheel RUNTIME DESTINATION bin )
@@ -397,16 +394,15 @@
 if (CFITSIO_FOUND AND FLI_FOUND)
 
 set(fliccd_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/ccd/fli_ccd.c
 )
 
 add_executable(indi_fli_ccd ${fliccd_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_fli_ccd ${FLI_LIBRARIES} ${CFITSIO_LIBRARIES} m z)
+target_link_libraries(indi_fli_ccd indibasedriver ${FLI_LIBRARIES} ${CFITSIO_LIBRARIES} m z)
 
 if (NOVA_FOUND)
-  target_link_libraries(indi_fli_ccd ${NOVA_LIBRARIES})
+  target_link_libraries(indi_fli_ccd indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)
 
 install(TARGETS indi_fli_ccd RUNTIME DESTINATION bin )
@@ -423,13 +419,12 @@
 if (NOVA_FOUND)
 
 set(stv_SRCS
-   ${indimain_SRCS}
    ${CMAKE_SOURCE_DIR}/drivers/video/stvdriver.c
    ${CMAKE_SOURCE_DIR}/drivers/video/stv.c )
 
 add_executable(indi_sbig_stv ${stv_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_sbig_stv z m ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES})
+target_link_libraries(indi_sbig_stv indibasedriver z m ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES})
 
 install(TARGETS indi_sbig_stv RUNTIME DESTINATION bin )
 
@@ -444,7 +439,6 @@
 ADD_DEFINITIONS(-DHAVE_LINUX_VIDEODEV2_H)
 
 set(meade_lpi_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
 	${CMAKE_SOURCE_DIR}/drivers/video/indi_lpi.cpp
    )
@@ -454,7 +448,7 @@
 target_link_libraries(indi_meade_lpi z ${CFITSIO_LIBRARIES})
 
 if (NOVA_FOUND)
-  target_link_libraries(indi_meade_lpi ${NOVA_LIBRARIES})
+  target_link_libraries(indi_meade_lpi indibasedriver ${NOVA_LIBRARIES})
 endif (NOVA_FOUND)
 
 install(TARGETS indi_meade_lpi RUNTIME DESTINATION bin )
@@ -467,7 +461,6 @@
 if (CFITSIO_FOUND)
 
 set(v4lphilips_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
 	${CMAKE_SOURCE_DIR}/drivers/video/v4lphilips.cpp
 	${CMAKE_SOURCE_DIR}/drivers/video/indi_philips.cpp
@@ -475,7 +468,7 @@
 
 add_executable(indi_v4l_philips ${v4lphilips_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_v4l_philips m z ${CFITSIO_LIBRARIES})
+target_link_libraries(indi_v4l_philips indibasedriver m z ${CFITSIO_LIBRARIES})
 
 if (NOVA_FOUND)
   target_link_libraries(indi_v4l_philips ${NOVA_LIBRARIES})
@@ -491,14 +484,13 @@
 if (CFITSIO_FOUND)
 
 set(v4ldriver_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
 	${CMAKE_SOURCE_DIR}/drivers/video/indi_v4l.cpp
    )
 
 add_executable(indi_v4l_generic ${v4ldriver_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(indi_v4l_generic m z ${CFITSIO_LIBRARIES})
+target_link_libraries(indi_v4l_generic indibasedriver m z ${CFITSIO_LIBRARIES})
 
 if (NOVA_FOUND)
   target_link_libraries(indi_v4l_generic ${NOVA_LIBRARIES})
@@ -570,13 +562,12 @@
 ## Build Examples. Not installation
 ########### Tutorial one ##############
 set(tutorialone_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_one.c
    )
 
 add_executable(tutorial_one ${tutorialone_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(tutorial_one  m)
+target_link_libraries(tutorial_one indibasedriver m)
 
 if (NOVA_FOUND)
   target_link_libraries(tutorial_one ${NOVA_LIBRARIES})
@@ -584,13 +575,12 @@
 
 ########### Tutorial two ##############
 set(tutorialtwo_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_two.c
    )
 
 add_executable(tutorial_two ${tutorialtwo_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(tutorial_two  m)
+target_link_libraries(tutorial_two indibasedriver m)
 
 if (NOVA_FOUND)
   target_link_libraries(tutorial_two ${NOVA_LIBRARIES})
@@ -598,13 +588,12 @@
 
 ########### Tutorial three ##############
 set(tutorialthree_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_three.c
    )
 
 add_executable(tutorial_three ${tutorialthree_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(tutorial_three m z)
+target_link_libraries(tutorial_three indibasedriver m z)
 
 if (NOVA_FOUND)
   target_link_libraries(tutorial_three ${NOVA_LIBRARIES})
@@ -612,13 +601,12 @@
 
 ########### Tutorial four ##############
 set(tutorialfour_SRCS
-        ${indimain_SRCS}
         ${CMAKE_SOURCE_DIR}/examples/tutorial_four.cpp
    )
 
 add_executable(tutorial_four ${tutorialfour_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(tutorial_four indidefaultdriver m z pthread)
+target_link_libraries(tutorial_four indidefaultdriver indibasedriver m z pthread)
 
 if (NOVA_FOUND)
   target_link_libraries(tutorial_four ${NOVA_LIBRARIES})
@@ -627,13 +615,12 @@
 
 ########### Tutorial dome ##############
 set(tutorialdome_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_dome.c
    )
 
 add_executable(tutorial_dome ${tutorialdome_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(tutorial_dome  m)
+target_link_libraries(tutorial_dome indibasedriver  m)
 
 if (NOVA_FOUND)
   target_link_libraries(tutorial_dome ${NOVA_LIBRARIES})
@@ -641,13 +628,12 @@
 
 ########### Tutorial rain ##############
 set(tutorialrain_SRCS
-	${indimain_SRCS}
 	${CMAKE_SOURCE_DIR}/examples/tutorial_rain.c
    )
 
 add_executable(tutorial_rain ${tutorialrain_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
 
-target_link_libraries(tutorial_rain  m)
+target_link_libraries(tutorial_rain indibasedriver m)
 
 if (NOVA_FOUND)
   target_link_libraries(tutorial_rain ${NOVA_LIBRARIES})
